{% for recommend in recommends if recommend.goods|default(null) %}
  {% set goods = recommend.goods %}
  {% set teacherId = goods.creator %}
  {% if teacherId %}
    {% set teacher = data('User',{userId:teacherId}) %}
  {% endif %}
  {% set showUrl = path('goods_show', {id: goods.id}) %}
  <div class="open-course-recommend clearfix">
    <div class="open-course-img">
      <a href="{{ showUrl }}" target="_blank" title="{{ goods.title }}">
        <img class="img-responsive" src="{{ filepath(goods.images.middle|default(''), 'course.png') }}"
             alt="{{ goods.title }}">
      </a>
    </div>
    <div class="open-course-content">
      <div class="title">
        <a href="{{ showUrl }}" title="{{ goods.title }}">{{ goods.title }}</a>
      </div>
      <div class="metas">
{#        {% if setting('course.show_student_num_enabled', '1') == 1  %}#}
{#          <span class="pull-right">{{ 'open_course.student_num'|trans({'%num%':course.studentNum}) }}</span>#}
{#        {% endif %}#}
        {% if teacher|default(null) %}
          {{ teacher.nickname }}
        {% endif %}
      </div>
    </div>
  </div>
{% else %}
  <div class="empty">{{ 'course.recommend_course.empty_tips'|trans }}</div>
{% endfor %}